/*
 * The MIT License
 *
 * Copyright 2015 chronosinfo.com.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 * Autor John Vanderson M Lima
 */

package com.chronos.pafecf.entidades;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author usuario
 */
@Entity
@Table(name = "SINTEGRA_60M", catalog = "", schema = "")
@NamedQueries({
    @NamedQuery(name = "Sintegra60m.findAll", query = "SELECT s FROM Sintegra60m s")})
public class Sintegra60m implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "ID", nullable = false)
    private Integer id;
    @Column(name = "DATA_EMISSAO")
    @Temporal(TemporalType.DATE)
    private Date dataEmissao;
    @Column(name = "NUMERO_SERIE_ECF", length = 20)
    private String numeroSerieEcf;
    @Column(name = "NUMERO_EQUIPAMENTO")
    private Integer numeroEquipamento;
    @Column(name = "MODELO_DOCUMENTO_FISCAL", length = 2)
    private String modeloDocumentoFiscal;
    @Column(name = "COO_INICIAL")
    private Integer cooInicial;
    @Column(name = "COO_FINAL")
    private Integer cooFinal;
    @Column(name = "CRZ")
    private Integer crz;
    @Column(name = "CRO")
    private Integer cro;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Column(name = "VALOR_VENDA_BRUTA", precision = 18, scale = 6)
    private BigDecimal valorVendaBruta;
    @Column(name = "VALOR_GRANDE_TOTAL", precision = 18, scale = 6)
    private BigDecimal valorGrandeTotal;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "idSintegra60m")
    private List<Sintegra60a> sintegra60aList;

    public Sintegra60m() {
    }

    public Sintegra60m(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Date getDataEmissao() {
        return dataEmissao;
    }

    public void setDataEmissao(Date dataEmissao) {
        this.dataEmissao = dataEmissao;
    }

    public String getNumeroSerieEcf() {
        return numeroSerieEcf;
    }

    public void setNumeroSerieEcf(String numeroSerieEcf) {
        this.numeroSerieEcf = numeroSerieEcf;
    }

    public Integer getNumeroEquipamento() {
        return numeroEquipamento;
    }

    public void setNumeroEquipamento(Integer numeroEquipamento) {
        this.numeroEquipamento = numeroEquipamento;
    }

    public String getModeloDocumentoFiscal() {
        return modeloDocumentoFiscal;
    }

    public void setModeloDocumentoFiscal(String modeloDocumentoFiscal) {
        this.modeloDocumentoFiscal = modeloDocumentoFiscal;
    }

    public Integer getCooInicial() {
        return cooInicial;
    }

    public void setCooInicial(Integer cooInicial) {
        this.cooInicial = cooInicial;
    }

    public Integer getCooFinal() {
        return cooFinal;
    }

    public void setCooFinal(Integer cooFinal) {
        this.cooFinal = cooFinal;
    }

    public Integer getCrz() {
        return crz;
    }

    public void setCrz(Integer crz) {
        this.crz = crz;
    }

    public Integer getCro() {
        return cro;
    }

    public void setCro(Integer cro) {
        this.cro = cro;
    }

    public BigDecimal getValorVendaBruta() {
        return valorVendaBruta;
    }

    public void setValorVendaBruta(BigDecimal valorVendaBruta) {
        this.valorVendaBruta = valorVendaBruta;
    }

    public BigDecimal getValorGrandeTotal() {
        return valorGrandeTotal;
    }

    public void setValorGrandeTotal(BigDecimal valorGrandeTotal) {
        this.valorGrandeTotal = valorGrandeTotal;
    }

    public List<Sintegra60a> getSintegra60aList() {
        return sintegra60aList;
    }

    public void setSintegra60aList(List<Sintegra60a> sintegra60aList) {
        this.sintegra60aList = sintegra60aList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Sintegra60m)) {
            return false;
        }
        Sintegra60m other = (Sintegra60m) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.chronos.pafecf.entidades.Sintegra60m[ id=" + id + " ]";
    }
    
}
